<template>
  <van-list
    v-model="loading"
  :finished="finished"
  finished-text="没有更多了"
  @load="onLoad">

    <van-row>
        <van-col span="12" class="item" v-for="(v,k) in goods" :key="k">
          <router-link :to="{name:'goods.desc',query:{id:v.id}}">
            <van-row class="img">
              <van-col span="24">
                <van-image width="100%" height="230px" :src="v.img"/>
              </van-col>
            </van-row>
            <van-row class="price">
              <van-col span="24">
                <span class="newPrice"><b>{{ v.newPrice }}</b></span> <s class="oldPrice">{{ v.oldPrice }}</s>
              </van-col>
            </van-row>
            <van-row class="title">
              <van-col span="24">
                <p>{{v.title|hiddenWorld(28)}}</p>
              </van-col>
            </van-row>
          </router-link>

        </van-col>
    </van-row>

  </van-list>
</template>

<script>
    import { List,Row, Col,Image } from 'vant'
    export default {
        name: "Goodslist",
        data(){
            return {
                loading:false,
                finished:true,
                goods:[
                    {
                        id:4,
                        img:'https://img.yzcdn.cn/vant/t-thirt.jpg',
                        title:'李宁｜运动羽绒服男秋冬季节连帽保暖面包服男保暖加厚黑休闲外套男冬',
                        newPrice:'¥599',
                        oldPrice:'¥999',
                    },
                    {
                        id:3,
                        img:'https://h2.appsimg.com/a.appsimg.com/upload/merchandise/pdcvis/2019/10/17/102/8062f8b6-9556-4d32-b457-03b74155a993_420_531_304x384_80.jpg',
                        title:'北极绒 | 赫本风 秋冬长款呢料大衣女厚收腰显瘦2019毛呢外套',
                        newPrice:'¥599',
                        oldPrice:'¥999',
                    },
                    {
                        id:2,
                        img:'https://h2.appsimg.com/a.appsimg.com/upload/merchandise/pdcvis/614647/2019/0702/71/730b6502-6108-4bec-b8ef-a05066c8ae9c_420_531_304x384_80.jpg',
                        title:'高梵 | 100%羊毛双面呢中长款精致翻领女式大衣',
                        newPrice:'¥599',
                        oldPrice:'¥999',
                    },
                    {
                        id:1,
                        img:'https://h2.appsimg.com/a.appsimg.com/upload/merchandise/pdcvis/2019/07/13/64/8ae3d1b4-d797-477d-be2b-9c256ecfb5dd_420_531_304x384_80.jpg',
                        title:'JOSFOND | 2019新款女式大衣显瘦中长款毛呢大衣女拼色潮流呢子大衣',
                        newPrice:'¥599',
                        oldPrice:'¥999',
                    }
                ]
            }
        },
        components:{
            [List.name]:List,
            [Row.name]:Row,
            [Col.name]:Col,
            [Image.name]:Image
        },
        methods:{
            onLoad(){

            }
        }
    }
</script>

<style scoped>
  .item {
    height:310px;
    background-color: white;
  }
  .price {
    text-align: left;
    padding-left: 5px;
    color: black;
  }
  .oldPrice {
    font-size: 8px;
    color: black;
  }
  .title {
    text-align: left;
    padding-left: 5px;
    font-size: 10px;
    color: black;
  }
</style>
